package com.rd.student.ruanjian.class1.duhang.New00;

import java.util.HashSet;

public class Homework {
    public static void main(String[] args) {
        int[] arr = new int[50];
        for (int i = 0; i < 50; i++) {
            arr[i] = i;
        }
        HashSet<Integer> set = new HashSet<>();
        int a = 10;
        while (a < 10) {

            while (set.size() < 20) {
                int random = (int) (Math.random() * arr.length);
                set.add(arr[random]);
                HashSet[] arr1 = {set};
                System.out.println(arr1[0]);
            }
        }
    }
}
